#!/usr/bin/perl -w

while(<STDIN>){
	chomp;
	@hex = split(/ /,$_);
	
	# $14,$13,$18,$17
	print hex($hex[13]) . "." . hex($hex[12]) . " " . hex($hex[17]) . "." . hex($hex[16]) . "\n";
}
